package com.guo.fristspringboot.controller;

import com.guo.fristspringboot.entity.Score;
import com.guo.fristspringboot.entity.Student;
import com.guo.fristspringboot.mapper.ScoreMapper;
import com.guo.fristspringboot.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/sco")
public class ScoreController {

    @Autowired
    private ScoreMapper scoreMapper;

    @RequestMapping("/getAll")
    public List<Score> getAll(){
        return scoreMapper.getAll();
    }

    @RequestMapping("/getById")
    public Score getById(){
        return scoreMapper.getById("1");
    }



}
